# 1、导包
import unittest
import app
import HTMLTestRunner_PY3
from script.test_emp_params import TestEmp
from script.test_login_params import TestLogin
# 2、创建测试套件
suite = unittest.TestSuite()
# 3、在测试套件中添加测试用例
suite.addTest(unittest.makeSuite(TestLogin))
suite.addTest(unittest.makeSuite(TestEmp))
# 4、定义测试报告的路径 lib
report_path = app.BASE_DIR + "/report/ihrm.html"
# 5、使用HTMLTestRunner
with open(report_path, mode="wb") as f:
    # 实例化HTMLTestRunner
    runner = HTMLTestRunner_PY3.HTMLTestRunner(f)
    # 使用runner运行套件
    runner.run(suite)
